//
//  NSIndexPath+additive.m
//  2048-cleanModel
//
//  Created by User-16 on 4/11/14.
//  Copyright (c) 2014 IOTrainingCamp. All rights reserved.
//

#import "NSIndexPath+additive.h"

@implementation NSIndexPath (additive)

-(NSIndexPath*) addIndexPath:(NSIndexPath*) toAdd
{
    return [NSIndexPath indexPathForRow:self.row + toAdd.row inSection:self.section + toAdd.section];
}

-(NSIndexPath*) subtractIndexPath:(NSIndexPath*) toSub
{
    return [NSIndexPath indexPathForRow:self.row - toSub.row inSection:self.section - toSub.section];
}

@end
